{% extends 'templates/base_hader.html' %}
{% block content %}

    <div class="container-fluid">
        <div class="row">
            <div class="col-sm-1">
                <div class="panel panel-primary">
                    <div class="panel-heading">
                        <h3 class="panel-title"><a href="/plan/plan_list/?query=制造一课">制造一课</a></h3>
                    </div>
                    <div class="panel-body small">
                        <ul class="nav nav-sidebar">
                            <li><a href="/plan/plan_list/?query=SMT_1L">1L计划</a></li>
                            <li><a href="/plan/plan_list/?query=SMT_2L">2L计划</a></li>
                            <li><a href="/plan/plan_list/?query=SMT_3L">3L计划</a></li>
                            <li><a href="/plan/plan_list/?query=SMT_4L">4L计划</a></li>
                            <li><a href="/plan/plan_list/?query=SMT_5L">5L计划</a></li>
                            <li><a href="/plan/plan_list/?query=SMT_6L">6L计划</a></li>
                            <li><a href="/plan/plan_list/?query=SMT_7L">7L计划</a></li>
                            <li><a href="/plan/plan_list/?query=SMT_8L">8L计划</a></li>
                            <li><a href="/plan/plan_list/?query=SMT_9L">9L计划</a></li>
                            <li><a href="/plan/plan_list/?query=AI_1L">RH-1L</a></li>
                            <li><a href="/plan/plan_list/?query=AI_2L">RH-2L</a></li>
                            <li><a href="/plan/plan_list/?query=AI_3L">RH-3L</a></li>

                        </ul>

                    </div>
                </div>
                <div class="panel panel-primary">
                    <div class="panel-heading">
                        <h3 class="panel-title"><a href="/plan/plan_list/?query=制造二课">制造二课</a></h3>
                    </div>
                    <div class="panel-body small">
                        <ul class="nav nav-sidebar">
                            <li><a href="/plan/plan_list/?query=DIP_C">C线计划</a></li>
                            <li><a href="/plan/plan_list/?query=DIP_F">F线计划</a></li>
                            <li><a href="/plan/plan_list/?query=DIP_M">M线计划</a></li>
                            <li><a href="/plan/plan_list/?query=DIP_TS">测试线</a></li>
                            <li><a href="/plan/plan_list/?query=DIP_TJ">涂胶线</a></li>
                            <li><a href="/plan/plan_list/?query=DIP_ZJ">注胶线</a></li>
                            <li><a href="/plan/plan_list/?query=DIP_JJ">浸胶线</a></li>

                        </ul>
                    </div>
                </div>
                <ul class="nav nav-sidebar">
                    <li class="active"><a href="/plan/order_list/">工单列表 <span class="sr-only">(current)</span></a></li>
                    <li class="active"><a href="/plan/daily_list/">日报列表 <span class="sr-only">(current)</span></a></li>
                    <li class="active"><a href="/plan/daily_status/">完成进度列表 <span class="sr-only">(current)</span></a></li>
                    {#                    <li class="active"><a href="/plan/plan_list/?query=制造一课">制造一课计划列表 <span#}
                    {#                            class="sr-only">(current)</span></a></li>#}
                    {#                    <li class="active"><a href="/plan/plan_list/?query=制造二课">制造二课计划列表 <span class="sr-only">(current)</span></a>#}
                    {#                    </li>#}
                    <li class="active"><a href="#"></a></li>
                </ul>
                {#                <ul class="nav nav-sidebar">#}
                {#                    <li class="active"><a href="/plan/order_list/">日报列表 <span class="sr-only">(current)</span></a>#}
                {#                    </li>#}
                {#                    <li class="active"><a href="/plan/plan_list/">制造二课日报列表 <span#}
                {#                            class="sr-only">(current)</span></a></li>#}
                {#                    <li><a href="#"></a></li>#}
                {#                    <li><a href="#"></a></li>#}
                {#                </ul>#}

            </div>
            <div class="col-md-11" style="height: auto">
                <div class="clearfix"><h2 class="sub-header">计划列表</h2></div>


{#                <button class="btn btn-info pull-right"><a#}
{#                        href="{% url 'add_order' %}?next={{ request.get_full_path }}">添加工单</a>#}
                </button>
                <form action="" method="get">
                    <div class="col-md-3">
                        <div class="row">
                            <input type="text" value="" name="query">
{#                            <div class="col">#}
{#                                <label class="form-inline"></label>#}
{#                                </div>#}
{#                            <div class="col"><label class="form-inline"><input type="text" value="" name="query1"></label></div>#}


                            <input type="submit" class="btn btn-primary" value="搜索">
                        </div>

                    </div>
                </form>


                <form action="{% url 'bulk_edit' %}" method="get">
                    {% csrf_token %}
                    <div class="row">
                        <div class="col-md-3">
                            <div>
                                <select name="action">
                                    <option value="">----------</option>
                                    <option value="bulk_edit">批量编辑</option>
{#                                    <option value="delete">删除</option>#}
                                </select>
                                <button type="submit" class="btn btn-success"><small>提交</small></button>

                            </div>
                        </div>

                    </div>

                    <div class="table-responsive ">
                        <table class="table table-hover" data-height="500">
                            <thead>
                            <tr>
                                <th style="width: 20px">选择</th>
                                <th>#</th>
                                {#                                <th>工程编号</th>#}
                                <th>客户</th>
                                <th>机种名</th>
                                <th>工单数量</th>
                                <th>生产数量</th>
                                <th>生产工程</th>
                                <th>线别</th>
                                <th>生产日期</th>
                                <th>班次</th>
                                <th>出货日期</th>
                                <th>备注</th>
                                <th>负荷</th>
                                <th>切换</th>
                                <th>顺序</th>
                                <th>制造部门</th>
                                <th>检查时间</th>
                                <th>编辑</th>
                            </tr>
                            </thead>
                            <tbody class="table table-striped">
                            {% for plan in plan_list %}
                                <tr style="font-size:smaller">
                                    <td><input type="checkbox" name="cid" value="{{ plan.id }}"></td>
                                    <td>{{ forloop.counter }}</td>
                                    {#                                    <td>{{ plan.plan_pro_code }}</td>#}
                                    <td>{{ plan.customer.small_name }}</td>
                                    <td>{{ plan.sku.name }}</td>
                                    <td>{{ plan.Lot }}</td>
                                    <td>{{ plan.work_int }}</td>
                                    <td>{{ plan.work_process }}</td>
                                    <td>{{ plan.get_line_display }}</td>
                                    <td>{{ plan.date_num|date:'Y-m-d' }}</td>
                                    <td>{{ plan.get_work_num_display }}</td>
                                    <td>{{ plan.spd|date:'Y-m-d' }}</td>
                                    <td>{{ plan.memo|default:"" }}</td>
                                    <td>{{ plan.working_hours }}</td>
                                    <td>{{ plan.change_time }}</td>
                                    <td>{{ plan.production_line_num }} &nbsp | <a
                                            href="{% url 'seq' plan.id %}?{{ next_url }}">修改</a>
                                    </td>
                                    <td>{{ plan.production_department }}</td>
                                    <td>{{ plan.check_time }}</td>
                                    <td>
                                        <div class="dropdown">
                                            <button class="btn btn-info dropdown-toggle" type="button"
                                                    id="dropdownMenu1"
                                                    data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"
                                                    style="height: 25px">
                                                编辑
                                                <span class="caret"></span>
                                            </button>
                                            <ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
{#                                                <li><a href="{% url 'seq' plan.id %}?{{ next_url }}">修改</a></li>#}
                                                <li><a href="{% url 'edit_plan' plan.id %}?{{ next_url }}">分批</a></li>
                                                <li><a href="{% url 'merge_plan' plan.id %}?{{ next_url }}">合并</a>
                                                </li>
                                                <li><a href="{% url 'delete_plan' plan.id %}?{{ next_url }}">删除</a>
                                                </li>
                                                <li><a href="{% url 'add_daily' plan.id %}?{{ next_url }}">输日报</a>
                                                </li>
                                                <li><a href="{% url 'search' plan.id %}?{{ next_url }}">查询</a>
                                                </li>
                                            </ul>

                                        </div>
                                    </td>

                                </tr>
                            {% endfor %}


                            </tbody>
                        </table>
                        <div class="pull-right">{{ page_obj.page_html |safe }}</div>
                    </div>
                </form>


            </div>
        </div>
    </div>
{% endblock %}

{% block js %}
    <script>


    </script>
{% endblock %}

